package com.example.tijianserver.mapper;

import com.example.tijianserver.dto.CalendarResponseDto;
import com.example.tijianserver.dto.OrdersMapperDto;
import com.example.tijianserver.pojo.Orders;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OrdersMapper {
    int deleteByPrimaryKey(Integer orderId);

    int insert(Orders record);

    Orders insertSelective(Orders orders);

    Orders selectByPrimaryKey(Integer orderId);

    int updateByPrimaryKeySelective(Orders record);

    int updateByPrimaryKey(Orders record);

    //根据parameList参数，查询30天预约日期中，每一天的已预约人数
    public List<CalendarResponseDto> listOrdersAppointmentNumber(List<OrdersMapperDto> list);

    int updatestate(int orderId, int state);

     //根据userId 查询Orders
    @Select("SELECT * FROM orders WHERE userId = #{userId}")
     List<Orders> getPersonalOrder(String  userId);

}